<div class="modal fade bs-modal-md" id="modelContent">
	<div class="modal-dialog modal-md">
        <div class="modal-content"  style="width: 800px"></div>
    </div>
</div> 
<div class="portlet box green">
	<div class="portlet-title">
	    <div class="caption"><i class="fa fa-cog"></i>货品管理 > 货品属性 > 标签管理</div>
		<div class="tools">
			<a href="javascript:;" class="collapse right" data-original-title="" title=""> </a>
    	</div>
    	<div class="actions">
			<a href="javascript:;" class="btn white btn-sm ajax-search"><i class="fa fa-search"></i> 查询 </a>
			<a href="javascript:;" class="btn white btn-sm search-reset"><i class="fa fa-eraser"></i> 清除 </a>
		</div>
	</div>
	<div class="portlet-body form">
	   	<form action="/productLabel/list" class="form-horizontal" method="get" id="searchForm" onsubmit="return false">
			<div class="form-body">
				<div class="row">
					<div class="col-md-3">
						<label class="col-md-4 control-label">标签名称</label>
						<div class="col-md-8">
					    	<input type="text" class="form-control" name="name" value="$!name">
						</div>
					</div>
					<div class="col-md-3">
						<label class="control-label col-md-4">创建时间：</label> 
						<label class="col-md-8">
							<input class="form-control" type="text" name="startTime" id="startTime" value="$!startTime" readonly>
							<i class="fa fa-calendar" style="position: absolute;right: 10px;top: 10px"></i>
						</label>
					</div>
					<div class="col-md-3">
						<label class="control-label col-md-4">至：</label> 
						<label class="col-md-8">
							<input class="form-control" type="text" name="endTime" id="endTime" value="$!endTime" readonly>
							<i class="fa fa-calendar" style="position: absolute;right: 10px;top: 10px"></i>
						</label>
					</div>
	    		</div>
			</div>
		</form>
	</div>
</div>

<div class="portlet box green">
    <div class="portlet-title">
		<div class="caption"><i class="fa fa-cogs"></i>标签列表</div>
		<div class="tools"><a href="javascript:;" class="collapse" data-original-title="" title=""> </a></div>
		<div class="actions"><a href="#modelContent" thref="/productLabel/add" class="btn white btn-sm ajax-model-get" data-toggle="modal"><i class="fa fa-plus"></i> 新增 </a></div>
    </div>
    <div class="portlet-body">
    	<div class="dataTables_wrapper no-footer">
			<div class="table-scrollable">
			    <table class="table table-striped table-bordered table-hover">
				  	<thead>
						<tr>
		   		 			<th>标签名称</th>
		   		 			<th>图片</th>
		   		 			<th>启用状态</th>
		   		 			<th>排序</th>
		   		 			<th>创建时间</th>
		   		 			<th>所属货品</th>
							<th class="col-md-2">操作</th>
						</tr>
					</thead>
					<tbody>
					#foreach($item in $pageProductLabel.result)
		  			#set($state = false)
		  				<tr
		  						#foreach($name in  $!defaultData)
										#if($!name == $!item.name )
										#set($state = true)
										 class="active"
										#end
								#end
		  				
		  				>  
						    <td>$!item.name</td>
						    <td> 
			                    #if($!item.image)
	                     		 <a href="$!item.image" class="fancybox-button" data-rel="fancybox-button">
	                               <img title="$!item.name" src="$!item.image" width="42px" height="25px">
	                             </a>
								#end
						    </td>
						    <td> 
						    #if($!item.status)
								<i class="fa fa-check font-yellow-gold"></i>
								#else
								<i class="fa fa-close font-red-flamingo"></i>
							 #end
						    </td>
						    <td>$!item.sort</td>
						    <td>$!item.createTime</td>
						    <td><a data-toggle="modal" href="#modelContent"  thref="/productLabel/checkSee?labels=$!item.name"   class="btn green btn-outline btn-sm ajax-model-get">
		                                                                   查看
		                        </a>
		                        
		                        <!-- class="btn btn-primary ajax-model-get" -->
		                        <!-- <a href="#modelContent" thref="/product/skuList?productId=26" class="ajax-model-get" data-toggle="modal">查看</a> -->
		                  </td>
			    			<td>
						    	<a class="btn green btn-outline btn-sm ajax-model-get" data-toggle="modal"
									href="#modelContent" thref="/productLabel/edit?id=$!item.id&editState=$!state"> 
									<i class="fa fa-edit"></i>编辑
								</a>
								
								<a class="btn green btn-outline btn-sm ajax-delete" 
									href="javascript:;"
										#if($!state)
											style="display: none;"
										#end
									 thref="/productLabel/delete?id=$!item.id">
									<i class="fa fa-trash"></i>删除
								</a>
						    </td>		  			
		  				</tr>
					#end
					</tbody>
				</table>
			</div>
			#set($page=$pageProductLabel)
			#set($pageUrl="/productLabel/list?&pageNo=")
			#parse("_page.htm")
		</div>
    </div>
</div>
<script type="text/javascript">
     $("input[name=name]").focus();
     $(".fancybox-button").fancybox();
</script>
<script src="/assets/scripts/views-date.js" type="text/javascript"></script>